<?php
/**
 * Class descript.
 * User: chan
 * Date: 2017/10/20 11:22
 */
namespace app\api\validate;
class Shop extends BaseValidate
{
    public function detail()
    {
         $this->rule = [
             'access_token' => 'require|isNotEmpty',
            'id' => 'require|isNotEmpty',
            //'code' => 'require|isNotEmpty',
        ];
         $this->message = [
             'access_token.require' => 'access_token必传',
            'id.require' => 'ID必传',
            //'mobile.isMobile' => '手机号码格式错误',
          //  'code' => '验证码必填',
        ];
    }
    public function checkApplyParam()
    {
        $this->rule = [
            'realname' => 'require|isNotEmpty',
            'idcard' => 'require|isNotEmpty',
            'bankcard' => 'require|isNotEmpty',
            'shopname' => 'require|isNotEmpty',
            'address' => 'require|isNotEmpty',
        ];
        $this->message = [
            'realname' => '姓名必填',
            'idcard' => '身份证必填',
            'bankcard' => '银行卡必填',
            'shopname' => '店铺名称必填',
            'address' => '地址必填',
        ];
    }

    public function checkForgetParam()
    {
        $this->rule = [
            'mobile' => 'require|isMobile',
            'password' => 'require|isNotEmpty',
            'code' => 'require|isNotEmpty'
        ];
        $this->message = [
            'mobile.require' => '手机号码必填',
            'mobile.isMobile' => '手机号码格式错误',
            'password' => '密码必填',
            'code' => '验证码必填'
        ];
    }
}